Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(popover): add autoAlignBoundary for configurable collision boundary #16995

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tay1orjones
Copy link
Member

@tay1orjones tay1orjones commented Jul 18, 2024

Closes #16879
Closes #16982
Relies on #17139

This adds a new prop that enables consumers to configure what element is used in the overflow detection for autoAlign via floating-ui. The new storybook example shows a custom boundary element (marked by a dashed border). The popover repositions based on this element, rather than the viewport.

Changelog

New

  • Add autoAlignBoundary to Popover

Testing / Reviewing

  • Look at the new storybook example and see if it works as you'd expect
  • Ensure no regressions are present in popover

borderColor: 'black',
margin: '0 auto',
}}
ref={setBoundary}>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL how this pattern works: https://www.youtube.com/watch?v=leEdHQh6nP8

@tay1orjones tay1orjones self-assigned this Jul 18, 2024
Copy link

netlify bot commented Jul 18, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 219b054
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/673f7f9c3ca5780008a36362
😎 Deploy Preview https://deploy-preview-16995--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit a46e928
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/673babb8f28a3800088fe5bc
😎 Deploy Preview https://deploy-preview-16995--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 219b054
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/673f7f9cc77dfe000865e66b
😎 Deploy Preview https://deploy-preview-16995--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 19, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 219b054
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/673f7f9ca060ec0008000b93
😎 Deploy Preview https://deploy-preview-16995--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.68%. Comparing base (a968944) to head (219b054).
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16995      +/-   ##
==========================================
+ Coverage   82.21%   82.68%   +0.47%     
==========================================
  Files         404      404              
  Lines       14200    14338     +138     
  Branches     4509     4641     +132     
==========================================
+ Hits        11674    11856     +182     
+ Misses       2363     2321      -42     
+ Partials      163      161       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@tay1orjones tay1orjones marked this pull request as ready for review November 21, 2024 19:00
@tay1orjones tay1orjones requested review from a team as code owners November 21, 2024 19:00
@tay1orjones tay1orjones requested review from kennylam, emyarod, alisonjoseph and ariellalgilmore and removed request for kennylam and emyarod November 21, 2024 19:00
Copy link
Member

@ariellalgilmore ariellalgilmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! the video was really helpful too!

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🚦 In Review
3 participants